package cn.innosmart.aq.view.activity;

import android.content.Intent;
import android.graphics.Point;
import android.os.Bundle;
import android.view.View;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.TextView;

import com.loopj.android.image.SmartImage;
import com.loopj.android.image.SmartImageView;

import org.w3c.dom.Text;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import cn.innosmart.aq.R;
import cn.innosmart.aq.view.activity.base.BaseActivity;

/**
 * Created by yulin724 on 16-11-4.
 */
public class FishDetailActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_fishdetail);


        Intent intent = getIntent();
        String url = intent.getStringExtra("url");

        SmartImageView imageView = (SmartImageView) findViewById(R.id.imageView1);
        imageView.setImageUrl(url);

        TextView tv_fd_title = (TextView) findViewById(R.id.tv_fd_title);
        TextView tv_fd_name = (TextView) findViewById(R.id.tv_fd_name);
        TextView tv_fd_contact = (TextView) findViewById(R.id.tv_fd_contact);
        TextView tv_fd_type = (TextView) findViewById(R.id.tv_fd_type);
        TextView tv_fd_price = (TextView) findViewById(R.id.tv_fd_price);
        TextView tv_fd_summary = (TextView) findViewById(R.id.tv_fd_summary);

        ImageView backIV = (ImageView) findViewById(R.id.iv_headicon);
        backIV.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        tv_fd_title.setText(intent.getStringExtra("name") + " " + intent.getStringExtra("title"));
        tv_fd_name.setText("");
        tv_fd_contact.setText("联系方式:" + intent.getStringExtra("contact"));
        tv_fd_type.setText("鱼种:" + intent.getStringExtra("type"));
        tv_fd_price.setText("报价:" + intent.getDoubleExtra("price", 0));
        tv_fd_summary.setText(intent.getStringExtra("desc"));
    }
}
